package com.winchain.chainbill.bill.biz.send.vo;

import com.shell.bee.acct.transaction.po.AcctTxRec;
import com.winchain.chainbill.bill.base.po.CbRec;
import com.winchain.chainbill.bill.biz.Bill;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BatchBillStats<T>
{
  private int affectedRows;
  private Map<String, BigDecimal> assets;
  private List<Bill<T>> abnormalRecords;
  private List<String> abnormalMsgs;
  private String txSnHost;
  List<AcctTxRec> acctTxRecs;
  
  public int getAffectedRows()
  {
    return this.affectedRows;
  }
  
  public void setAffectedRows(int affectedRows)
  {
    this.affectedRows = affectedRows;
  }
  
  public int addAffectedRows()
  {
    return ++this.affectedRows;
  }
  
  public Map<String, BigDecimal> getAssets()
  {
    return this.assets;
  }
  
  public void setAssets(Map<String, BigDecimal> assets)
  {
    this.assets = assets;
  }
  
  public void addPassedRecord(Bill<T> record)
  {
    if (this.assets == null) {
      this.assets = new HashMap();
    }
    addAffectedRows();
    String key = record.getRec().getBillId();
    BigDecimal bm = record.getRec().getBillAmt();
    BigDecimal value = (BigDecimal)this.assets.get(key);
    if (value == null) {
      value = new BigDecimal(0);
    }
    value = value.add(bm);
    this.assets.put(key, value);
  }
  
  public void addAbnormalRecord(Bill<T> record)
  {
    if (this.abnormalRecords == null) {
      this.abnormalRecords = new ArrayList();
    }
    this.abnormalRecords.add(record);
  }
  
  public void addAbnormalMsg(String msg)
  {
    if (this.abnormalMsgs == null) {
      this.abnormalMsgs = new ArrayList();
    }
    this.abnormalMsgs.add(msg);
  }
  
  public List<Bill<T>> getAbnormalRecord()
  {
    return this.abnormalRecords;
  }
  
  public void setAbnormalRecord(List<Bill<T>> abnormalRecords)
  {
    this.abnormalRecords = abnormalRecords;
  }
  
  public List<String> getAbnormalMsg()
  {
    return this.abnormalMsgs;
  }
  
  public void setAbnormalMsg(List<String> abnormalMsgs)
  {
    this.abnormalMsgs = abnormalMsgs;
  }
  
  public String getTxSnHost()
  {
    return this.txSnHost;
  }
  
  public void setTxSnHost(String txSnHost)
  {
    this.txSnHost = txSnHost;
  }
  
  public List<AcctTxRec> getAcctTxRecs()
  {
    return this.acctTxRecs;
  }
  
  public void setAcctTxRecs(List<AcctTxRec> acctTxRecs)
  {
    this.acctTxRecs = acctTxRecs;
  }
}
